<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/24
  Time: 11:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人中心-飞鱼</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/PersonCenter.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/PersonCenter.js"></script>
    <link rel="shortcut icon" href="#"/>
</head>
<body>
<div id="all">
    <div class="center">
        <h1>个人中心</h1>
    </div>
    <div class="list">
        <ul id="list">
            <li class="this">
                我的资料
            </li>
            <%--主播和粉丝--%>
            <li class="other">
                我的关注
            </li>
            <%--&lt;%&ndash;主播&ndash;%&gt;--%>
            <c:if test="${sessionScope.loginUser.anchorOrUser > 0}">
            <li class="other">
                我的粉丝
            </li>
            </c:if>
            <%--普通用户和主播--%>
            <li class="other">
                消费记录
            </li>
            <%--主播--%>
            <c:if test="${sessionScope.loginUser.anchorOrUser > 0}">
            <li class="other">
                收入详细
            </li>
            </c:if>

            <c:if test="${sessionScope.loginUser.anchorOrUser > 0}">
            <%--主播--%>
            <li class="other">
                我要开播
            </li>
            </c:if>

            <c:if test="${sessionScope.loginUser.anchorOrUser == 0}">
            <%--普通用户--%>
            <li class="other">
                申请成为主播
            </li>
            </c:if>
            <li class="other">
                设置
            </li>
        </ul>
    </div>
    <%--个人中心--%>
    <div class="info" id="info">
        <%--******************************************************************************************************--%>
        <%--我的资料--%>
        <div class="my_information sel">
            <%--我的资料--%>
            <div class="wodeziliao">
                <%--我的资料矢量图标--%>
                <span class="f1"></span>
                <%--我的资料文字--%>
                <p class="f2">我的资料</p>
            </div>
            <%--具体信息--%>
            <div class="specific">
                <%--头像框--%>
                <div class="head_frame">
                    <%--头像--%>
                    <div class="head_portrait">
                        <img src="${pageContext.request.contextPath}${sessionScope.queryAnchorByRoomId.photoImgUrl}"
                             alt="" name="photoImgUrl">
                    </div>
                    <%--具体描述--%>
                    <div class="describe">
                        <%--用户名--%>
                        <div class="user_name">
                            <div class="name">
                                <h2>${sessionScope.queryAnchorByRoomId.nickName}</h2>
                            </div>

                        </div>
                        <%--用户等级--%>
                        <div class="user_grade">
                            <div class="grade">

                                <a href="${pageContext.request.contextPath}/userInfo?methodName=signDay">
                                    <div class="level"></div>
                                </a>
                                <span class="level_day">
                                    签到${sessionScope.queryAnchorByRoomId.signDay}天
                                </span>
                            </div>
                        </div>
                        <%--用户余额--%>
                        <div class="user_balance">
                            <span class="balance">余额：${sessionScope.queryAnchorByRoomId.balance}</span>
                            <form action="${pageContext.request.contextPath}/userInfo?methodName=rechargeBalance" method="post">
                            充值的金额：<input type="text" name="money" style="width:100px"placeholder="请输入充值金额">
                            <input type="submit" value=" 充值">
                            </form>
                        </div>
                    </div>
                </div>

                <%--账号设置--%>
                <div class="set">
                    <div class="account_set">账号设置</div>
                    <form action="${pageContext.request.contextPath}/userInfo?methodName=updateInfoByAnchorId"
                          method="post">
                        <ul>
                            <%--修改昵称--%>
                            <li class="">
                                <div class="check_name"></div>
                                <input type="text" name="nickName" id="name" class="set_info"
                                       value="${sessionScope.queryAnchorByRoomId.nickName}">
                                <div style="text-align: left;margin-top: 9px ;">为了展现自我</div>
                            </li>
                            <%--修改电话--%>
                            <li>
                                <div class="check_phone"></div>
                                <input type="text" name="telephone1" id="phone" class="set_info"
                                       value="${sessionScope.queryAnchorByRoomId.phone}">
                                <div style="text-align: left;margin-top: 9px ;">您可以享受手机相关的安全及提醒服务</div>
                            </li>
                            <%--修改性别--%>
                            <li>
                                <div class="check_pwd"></div>
                                <c:if test="${'男'.equals(sessionScope.queryAnchorByRoomId.sex)}" var="a">
                                男<input type="radio" name="sex" id="man"  class="check" value="man" checked="checked">
                                女<input type="radio" name="sex" id="women" class="check" value="woman">
                                </c:if>
                                <c:if test="${!a}">
                                    男<input type="radio" name="sex" id="man"  class="check" value="man">
                                    女<input type="radio" name="sex" id="women" class="check" value="woman" checked="checked">
                                </c:if>
                                <div style="text-align: left;margin-top: 9px ;">是小姐姐？小哥哥？</div>
                            </li>
                            <%--修改email--%>
                            <li>
                                <div class="check_email"></div>
                                <input type="email" name="email1" id="email" class="set_info"
                                       value="${sessionScope.queryAnchorByRoomId.email}">
                                <div style="text-align: left;margin-top: 9px ;">您可以使用邮箱来保障您的帐号安全</div>
                            </li>
                        </ul>
                        <div style="margin-left: 100px;margin-top: 40px;width: 100px;">
                            <input type="submit" name="button" value="保存修改">
                        </div>

                    </form>
                </div>
            </div>
        </div>
        <%--******************************************************************************************************--%>
        <%--&lt;%&ndash;我的关注&ndash;%&gt;--%>
        <div class="my_information1 sel">
            <ul class="lists">
                <c:forEach items="${sessionScope.AttentionList}" var="anchor">
                    <li class="my_concern">
                        <div class="box">
                            <div class="photo">
                                <a href="${pageContext.request.contextPath}/jsp/room.jsp">
                                    <img src="${pageContext.request.contextPath}${anchor.photoImgUrl}" alt="">
                                </a>
                            </div>
                            <div class="zhibo">
                                <h1>${anchor.roomName}</h1>
                                <p>${anchor.nickName}</p>
                                <p>${anchor.attentionNums}</p>
                                <a href="${pageContext.request.contextPath}/attention?methodName=cancelAttention&anchorId=${anchor.userId}">
                                    <input type="button" value="取消关注"></a>
                            </div>
                        </div>
                    </li>
                </c:forEach>
            </ul>
        </div>

        <%--&lt;%&ndash;******************************************************************************************************&ndash;%&gt;--%>

        <%--&lt;%&ndash;我的粉丝&ndash;%&gt;--%>
        <c:if test="${sessionScope.loginUser.anchorOrUser > 0}">
        <div class="my_information1 sel">
            <ul class="lists">
                <c:forEach items="${sessionScope.selectAllFans}" var="anchor">
                    <li class="my_concern">
                        <div class="box">
                            <div class="photo">
                                <img src="${pageContext.request.contextPath}${anchor.photoImgUrl}" alt="">
                            </div>
                            <div class="zhibo">
                                <p>${anchor.nickName}</p>
                                <p>${anchor.signInfo}</p>
                                <p>${anchor.signDay}</p>
                                <p>${anchor.sex}</p>
                            </div>
                        </div>
                    </li>
                </c:forEach>
            </ul>
        </div>
        </c:if>


        <%--******************************************************************************************************--%>

        <%--消费记录--%>
        <div class="my_information1 sel">
            <div class="wodeziliao">
                <%--我的资料矢量图标--%>
                <span class="f3"></span>
                <%--我的资料文字--%>
                <p class="f2">消费记录</p>
            </div>
            <div class="consumption">
                <ul>
                    <li style="width: 25%;">消费时间</li>
                    <li style="width: 20%;">主播</li>
                    <li style="width: 20%;">赠送礼物</li>
                    <li style="width: 10%;">个数</li>
                    <li style="width: 15%;">总价</li>
                </ul>
            </div>
            <div class="record">
                <c:forEach items="${sessionScope.arrayListRecord}" var="record">
                    <ul>
                        <li style="width: 25%;">${record.rocTime}</li>
                        <li style="width: 20%;">${record.user.nickName}</li>
                        <li style="width: 20%;">${record.gift.giftName}</li>
                        <li style="width: 10%;">${record.rocNums}</li>
                        <li style="width: 15%;">${record.rocNums*record.gift.giftPrice}</li>
                    </ul>
                </c:forEach>
            </div>
            <%--<div class="tatol">--%>
                <%--当日总消费：--%>
            <%--</div>--%>
        </div>


        <%--******************************************************************************************************--%>

        <%--收入详细--%>
        <c:if test="${sessionScope.loginUser.anchorOrUser > 0}">
        <div class="my_information1 sel">
            <div class="wodeziliao">
                <%--我的资料矢量图标--%>
                <span class="f3"></span>
                <%--我的资料文字--%>
                <p class="f2">收入记录</p>
            </div>
            <div class="consumption">
                <ul>
                    <li style="width: 25%;">收入时间</li>
                    <li style="width: 20%;">粉丝</li>
                    <li style="width: 20%;">赠送礼物</li>
                    <li style="width: 10%;">个数</li>
                    <li style="width: 15%;">总价</li>
                </ul>
            </div>
            <div class="record">
                <c:forEach items="${sessionScope.recordsByAnchodId}" var="record">
                    <ul>
                        <li style="width: 25%;">${record.rocTime}</li>
                        <li style="width: 20%;">${record.user.nickName}</li>
                        <li style="width: 20%;">${record.gift.giftName}</li>
                        <li style="width: 10%;">${record.rocNums}</li>
                        <li style="width: 15%;">${record.gift.giftPrice*record.rocNums}</li>
                    </ul>
                </c:forEach>
            </div>
            <%--<div class="tatol">--%>
                <%--当日总收入：--%>
            <%--</div>--%>
        </div>
        </c:if>


        <%--******************************************************************************************************--%>
        <%--我要开播--%>
        <c:if test="${sessionScope.loginUser.anchorOrUser > 0}">
        <div class="my_information1 sel">
            <h2 class="personInfo">开启直播</h2>
            <div class="opinion_top_left1"></div>
            <div class="star_button">
                <p>主播你太懒了，快去开播吧...</p>
                <div>
                    <a href="">
                        <input type="button" name="button" class="star" value="开始直播">
                    </a>
                </div>

            </div>
        </div>
        </c:if>

        <%--******************************************************************************************************--%>

        <%--申请成主播--%>
        <c:if test="${sessionScope.loginUser.anchorOrUser == 0}">
        <div class="my_information1 sel">
            <div class="authentication">
                <form action="">
                    <h2 class="personInfo">个人身份信息实名认证</h2>
                    <div class="opinion_top_left1"></div>
                    <div class="submission">
                        <div class="person_name">
                            姓名：
                            <input type="text" name="person_name" id="person_name" class="person_name"
                                   placeholder="请输入身份证上的名字">
                        </div>
                        <div class="person_ID">
                            身份证号：
                            <input type="text" name="person_ID" id="person_ID" class="person_ID"
                                   placeholder="请输入身份证上的号码">
                        </div>
                        <div class="submit">
                            <input type="submit" name="button" value="提交">
                        </div>
                        <div class="opinion_top_left1"></div>
                    </div>
                </form>
            </div>
        </div>
        </c:if>


        <%--******************************************************************************************************--%>

        <%--&lt;%&ndash;设置&ndash;%&gt;--%>
        <div class="my_information1 sel">
            <div id="opinion">意见反馈</div>
            <div class="opinion_top">
                <div id="opinion_top_left"></div>
                <div></div>
            </div>
            <div>
                类型:<input type="radio" name="typeName">使用帮助
                <input type="radio" name="typeName">直播问题
                <input type="radio" name="typeName">账号安全
                <input type="radio" name="typeName">直播伴侣
                <input type="radio" name="typeName">安卓手游TV
                <input type="radio" name="typeName">其他
            </div>
            <div class="opinion_top"></div>
            标题:<input type="text"><br><br>内容:<br>
            <input type="text" id="opinion_content"><br>
            <div id="opinion_submit"><input type="button" value="提交"></div>
        </div>
    </div>
</body>
</html>
